import 'package:flutter/material.dart';

void main() {
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: '商品订单信息',
      theme: ThemeData(
        primarySwatch: Colors.red,
      ),
      home: OrderInfoPage(),
    );
  }
}

class OrderInfoPage extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('案例-商品订单信息'),
        backgroundColor: Colors.red,
        actions: [
          Padding(
            padding: EdgeInsets.only(right: 16.0),
            // child: Text('DEBUG', style: TextStyle(color: Colors.white)),
          ),
        ],
      ),
      body: Padding(
        padding: EdgeInsets.all(16.0),
        child: Column(
          crossAxisAlignment: CrossAxisAlignment.start,
          children: [
            Row(
              mainAxisAlignment: MainAxisAlignment.spaceBetween,
              children: [
                Text('2024-08-15 21:49:48',
                    style: TextStyle(color: Colors.grey)),
                Text('待发货', style: TextStyle(color: Colors.orange)),
              ],
            ),
            SizedBox(height: 16),
            Row(
              children: [
                // Image.network(
                //   'https://ts1.cn.mm.bing.net/th?id=OADD2.7353159975213_1V929J50GJEUS7ZXMI&pid=21.2&c=17&roil=0&roit=0.0343&roir=1&roib=0.9639&w=300&h=157&dynsize=1&qlt=90', // 这里替换为实际图片链接
                //   width: 100,
                //   height: 100,
                // ),
                Image.asset(
                  'qqhead.jpg', // 这里替换为实际图片链接
                  width: 100,
                  height: 100,
                ),
                SizedBox(width: 16),
                Expanded(
                  child: Column(
                    crossAxisAlignment: CrossAxisAlignment.start,
                    children: [
                      Text('茶水分离杯耐热隔热玻璃杯茶水分离杯耐热隔热玻璃杯',
                          style: TextStyle(fontSize: 16)),
                      SizedBox(height: 4),
                      Text('规格: 白色240ml', style: TextStyle(color: Colors.grey)),
                      SizedBox(height: 4),
                      Text('¥119.5', style: TextStyle(color: Colors.grey)),
                    ],
                  ),
                ),
                SizedBox(width: 16),
                Text('x2', style: TextStyle(fontSize: 16)),
              ],
            ),
            SizedBox(height: 16),
            Row(
              mainAxisAlignment: MainAxisAlignment.end,
              children: [
                Text('合计: ¥239', style: TextStyle(fontSize: 16)),
              ],
            ),
            SizedBox(height: 16),
            Center(
              child: ElevatedButton(
                onPressed: () {},
                child: Text('再次购买'),
              ),
            ),
          ],
        ),
      ),
    );
  }
}
